package com.hengpeng.itfinoss.service;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.hengpeng.itfinbase.persist.UserInfo;

public class GuarantorManager
{
	private final static Map<Long, UserInfo> guarantMap = new ConcurrentHashMap<Long, UserInfo>();

	public static void addCache(List<UserInfo> guartors)
	{
		synchronized (guarantMap)
		{
			for (UserInfo user : guartors)
			{
				guarantMap.put(user.getId(), user);
			}
		}
	}

	public static UserInfo getGuarantor(Long id)
	{
		return guarantMap.get(id);
	}
}
